#ifndef IALGO_H
#define IALGO_H
#include <QString>
#include "visualdata.h"

class IAlgo: public QObject
{
public:
    IAlgo(QObject *parent):
        QObject(parent),
        _data(nullptr),
        _interval(0),
        _run_time(0)
    {}

    virtual ~IAlgo(){}

    virtual void setData(VisualData *pData)
    {
        _data = pData;
    }

    virtual QString name() = 0;

    virtual void run() = 0;

    virtual int runTime()
    {
        return _run_time;
    }

    virtual void setInterval(int milliseconds)
    {
        _interval = milliseconds;
    }

protected:
    VisualData *_data;
    int _interval;
    int _run_time;
};

#endif // IALGO_H
